Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix off-by-one error in train.py #7

Closed
wants to merge 1 commit into from

Conversation

codeman38
Copy link

random.randint specifies an inclusive range, so start_index was sometimes (file_len - chunk_len). This would produce input and target tensors of size (chunk_len - 1), instead of chunk_len, making the batch unparallelizable and causing a crash.

random.randint specifies an inclusive range, so start_index was
sometimes (file_len - chunk_len). This would produce input and
target tensors of size (chunk_len - 1), instead of chunk_len,
making the batch unparallelizable and causing a crash.
@codeman38
Copy link
Author

codeman38 commented Jan 10, 2018

Closing, as this is a duplicate of both #3 and #5.

@codeman38 codeman38 closed this Jan 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant